<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">
 <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
 </head>
    <ui:composition template="/template/template.xhtml">
    	<ui:define name="busca">
			<a4j:form>
				<div id="search">
					<h2>
						<h:outputText value="#{msgs.pesquiseartistas}" />
					</h2>
					<h:inputText styleClass="text" value="#{pesquisaBean.artista}" id="q" >
						<a4j:support event="onkeyup" action="#{pesquisaBean.pesquisarArtistas}" reRender="artistas" />
					</h:inputText>
					<a4j:commandButton value="#{msgs.buscar}" action="#{pesquisaBean.pesquisarArtistas}" id="submit" styleClass="submit" />
					<br />
				</div>
			</a4j:form>
		</ui:define>
    	<ui:define name="conteudo"> 
			<h2 class="titulo" >
				<h:outputText value="#{msgs.artistas}" />
			</h2>
			<rich:dataTable value="#{pesquisaBean.artistas}" style="width: 100%" var="artista" id="artistas">
				<rich:column>
					<div class="results">
						<table style="width: 100%">
							<tr>
								<td>
									<h:graphicImage url="#{artista.imagem}" width="150" height="100" alt="Pic 1" class="left" />
								</td>
								<td>
									<table class="info">
										<tr>
											<th><h:outputText value="#{msgs.nome}" /></th><td><h:outputText value="#{artista.nome}" /></td>
										</tr>
										<tr>
											<th><h:outputText value="#{msgs.descricao}" /></th><td><h:outputText value="#{artista.descricao}" /></td>
										</tr>
									</table>
								</td>
								<td align="right">
									<div class="btns">
										<h:outputLink value="artista.jsf?id=#{artista.id}">
											<h:outputText value="#{msgs.irpagina}" />
										</h:outputLink>
									</div>
									<div class="clear"></div>
								</td>
							</tr>
						</table>
					</div>
				</rich:column>
			</rich:dataTable>
		</ui:define>
    </ui:composition>
</html>